home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
flxhdr.zip
/
FLEXTEST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-03-09
|
1KB
|
51 lines
(*
This program demonstrates how to create a window frame that contains a
FlexHeader. It counts on the FlexHdr unit, which derives a new header type
from the existing HeaderNode object.
*)
{$S-,R-,V-,I-,B-,F-,A-}
program FlexTest;
uses
opstring, opcrt, opframe, opwindow, flexhdr;
const
TestColorSet : ColorSet = (
TextColor : $3B; TextMono : $07;
CtrlColor : $07; CtrlMono : $07;
FrameColor : $4F; FrameMono : $0F;
HeaderColor : $2E; HeaderMono : $70;
ShadowColor : $07; ShadowMono : $70
);
FlexColor : FlexAttrs = ($4B, $4F, $4D, $4E);
FlexMono : FlexAttrs = ($07, $0F, $70, $01);
var
w : RawWindow;
kw : word;
begin
clrscr;
w.initcustom(10, 5, 40, 15, TestColorSet,
wClear+wSaveContents+wBordered+wResizeable);
with w, wFrame do begin
addheader(' hello world ', heBR);
addanyheader(new(flexheaderptr,
init(^A'╡'^A' flexy '^B'color'^B' title '^A'╞'^A,
FlexColor, FlexMono, heTC, @wFrame)));
end;
w.draw;
kw := readkeyword;
for kw := 1 to 5 do begin
w.resizewindow(2, 1);
delay(500);
end;
for kw := 1 to 5 do begin
w.resizewindow(-2, -1);
delay(500);
end;
kw := readkeyword;
w.erase;
end.